A method of detecting a position or a posture of each work loaded into a tool machine, correcting a reference coordinate of a tool post or a reference angle of a spindle based on a detection value, and processing the work is widely performed at the time of processing the work by the tool machine.
As a structure of detecting a position or a posture of the work while not using a measurement unit such as a touch probe or a camera installed in a machine, a structure in which a rigid member (hereinafter, referred to as a “detection jig”) such as a round bar having a simple shape is attached to a tool post and a position or a posture of the work is detected based on a tool post position when the detection jig contacts the work is practically used. This structure is particularly useful for a tool machine including a turret tool post.
The contact between the detection jig attached to the tool post and the work can be detected by detecting an increase in load of a motor driving the tool post, a spindle, a work table, and the like. An increase in load of the motor can be detected by an increase in current value of the motor. As disclosed in Patent Documents 1 and 2, when the tool machine is an NC tool machine, the contact between the detection jig and the work can be detected with higher accuracy by detecting an increase in position deviation which is a difference signal between a tool post position instruction given to the motor and a feedback signal returned from the motor.
Patent Document 2 discloses a method of setting a reference angle of the spindle from two contact angles between the work and the detection jig at a D-shaped cross-section portion which obtained by scraping off a part of a cylindrical peripheral surface into a flat surface. The two contact angles are obtained the spindle rotates normally and reversely at the time of setting the reference angle.